<!--
 * @Description: ------------ fileDescription -----------
 * @Author: snows_l snows_l@163.com
 * @Date: 2024-08-19 13:40:25
 * @LastEditors: snows_l snows_l@163.com
 * @LastEditTime: 2025-08-01 10:00:33
 * @FilePath: \BLOG\src\components\common\ToolTip.vue
-->

<!--
  * @Description: 鼠标悬停显示提示信息
  *props:
  * content: 提示信息
  * placement: 位置
  * offset: 偏移量
  * transition: 过渡效果
-->
<template>
  <el-tooltip :content="content" :placement="placement" :offset="offset" :transition="transition">
    <slot></slot>
  </el-tooltip>
</template>

<script lang="ts" setup>
import { ElTooltip } from 'element-plus';

interface Props {
  content?: string;
  placement?: string;
  offset?: number;
  transition?: string;
}

const props = withDefaults(defineProps<Props>(), {
  appendTo: '',
  content: '',
  placement: 'top',
  offset: 0,
  transition: 'el-fade-in-linear'
});
</script>

<style lang="scss" scoped></style>
